.class public Lcom/htc/android/footprints/commonui/SDCardConfirmDialog;
.super Landroid/app/Activity;
.source "SDCardConfirmDialog.java"


# instance fields
.field private mIcon:Landroid/widget/ImageView;

.field private msgText:Landroid/widget/TextView;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 17
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    return-void
.end method


# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
    .locals 4
    .parameter "savedInstanceState"

    .prologue
    .line 24
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 26
    const/4 v2, 0x1

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/commonui/SDCardConfirmDialog;->requestWindowFeature(I)Z

    .line 28
    const v2, 0x7f030020

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/commonui/SDCardConfirmDialog;->setContentView(I)V

    .line 29
    const v2, 0x7f0c001a

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/commonui/SDCardConfirmDialog;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, p0, Lcom/htc/android/footprints/commonui/SDCardConfirmDialog;->msgText:Landroid/widget/TextView;

    .line 30
    invoke-virtual {p0}, Lcom/htc/android/footprints/commonui/SDCardConfirmDialog;->getIntent()Landroid/content/Intent;

    move-result-object v2

    const-string v3, "DATA"

    invoke-virtual {v2, v3}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 31
    .local v0, message:Ljava/lang/String;
    iget-object v2, p0, Lcom/htc/android/footprints/commonui/SDCardConfirmDialog;->msgText:Landroid/widget/TextView;

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 33
    const/high16 v2, 0x7f0c

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/commonui/SDCardConfirmDialog;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    iput-object v2, p0, Lcom/htc/android/footprints/commonui/SDCardConfirmDialog;->mIcon:Landroid/widget/ImageView;

    .line 35
    invoke-virtual {p0}, Lcom/htc/android/footprints/commonui/SDCardConfirmDialog;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f0a00a3

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_0

    .line 36
    iget-object v2, p0, Lcom/htc/android/footprints/commonui/SDCardConfirmDialog;->mIcon:Landroid/widget/ImageView;

    const v3, 0x7f0200e6

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 64
    :goto_0
    new-instance v1, Lcom/htc/android/footprints/utils/StorageUtil;

    invoke-virtual {p0}, Lcom/htc/android/footprints/commonui/SDCardConfirmDialog;->getApplicationContext()Landroid/content/Context;

    move-result-object v2

    invoke-direct {v1, v2}, Lcom/htc/android/footprints/utils/StorageUtil;-><init>(Landroid/content/Context;)V

    .line 65
    .local v1, storageUtil:Lcom/htc/android/footprints/utils/StorageUtil;
    new-instance v2, Lcom/htc/android/footprints/commonui/SDCardConfirmDialog$1;

    invoke-direct {v2, p0, v1}, Lcom/htc/android/footprints/commonui/SDCardConfirmDialog$1;-><init>(Lcom/htc/android/footprints/commonui/SDCardConfirmDialog;Lcom/htc/android/footprints/utils/StorageUtil;)V

    invoke-virtual {v1, v2}, Lcom/htc/android/footprints/utils/StorageUtil;->SetOnChangeStorageListerner(Lcom/htc/android/footprints/utils/StorageUtil$OnChangeStorageListener;)V

    .line 78
    invoke-virtual {v1}, Lcom/htc/android/footprints/utils/StorageUtil;->startStorageUtil()V

    .line 79
    return-void

    .line 38
    .end local v1           #storageUtil:Lcom/htc/android/footprints/utils/StorageUtil;
    :cond_0
    iget-object v2, p0, Lcom/htc/android/footprints/commonui/SDCardConfirmDialog;->mIcon:Landroid/widget/ImageView;

    const v3, 0x7f0200b9

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setImageResource(I)V

    goto :goto_0
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 2
    .parameter "keyCode"
    .parameter "event"

    .prologue
    .line 82
    const/4 v1, 0x4

    if-ne p1, v1, :cond_0

    .line 83
    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.intent.action.MAIN"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 84
    .local v0, intent:Landroid/content/Intent;
    const-string v1, "android.intent.category.HOME"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;

    .line 85
    const/high16 v1, 0x400

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 86
    invoke-virtual {p0, v0}, Lcom/htc/android/footprints/commonui/SDCardConfirmDialog;->startActivity(Landroid/content/Intent;)V

    .line 87
    invoke-virtual {p0}, Lcom/htc/android/footprints/commonui/SDCardConfirmDialog;->finish()V

    .line 88
    const/4 v1, 0x1

    .line 90
    .end local v0           #intent:Landroid/content/Intent;
    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x0

    goto :goto_0
.end method
